home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96a.txt
/
000191_icon-group-sender _Mon Aug 19 15:42:30 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-09-05
|
2KB
Received: by cheltenham.cs.arizona.edu; Tue, 20 Aug 1996 08:07:48 MST
Date: Mon, 19 Aug 1996 15:42:30 -0700 (MST)
Message-Id: <199608192242.PAA06268@primenet.com>
X-Sender: whm@mailhost.primenet.com
X-Mailer: Windows Eudora Pro Version 2.1.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: Chris Fraser <cwfraser@microsoft.com>
From: "William H. Mitchell" <whm@mse.com>
Subject: Re: evaluating
Cc: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
At 10:15 AM 8/19/96 -0700, Chris Fraser wrote:
>During the evaluation of, say,
>
> every (1 to 1000000)/real(n) ...
>
>n is converted to floating point once, not one million times, right?
>
I'd say a million.
Consider this program:
procedure main()
every (1 to 10)/f()
end
procedure f()
return 1
end
Here's the *icont* output with tracing:
: main()
x.icn : 2 | f()
x.icn : 5 | f returned 1
x.icn : 2 | f()
x.icn : 5 | f returned 1
x.icn : 2 | f()
x.icn : 5 | f returned 1
x.icn : 2 | f()
x.icn : 5 | f returned 1
x.icn : 2 | f()
x.icn : 5 | f returned 1
x.icn : 2 | f()
x.icn : 5 | f returned 1
x.icn : 2 | f()
x.icn : 5 | f returned 1
x.icn : 2 | f()
x.icn : 5 | f returned 1
x.icn : 2 | f()
x.icn : 5 | f returned 1
x.icn : 2 | f()
x.icn : 5 | f returned 1
x.icn : 3 main failed
The compiler might do better...